export default {
	addBar(state,add_num){
		for (let i=0;i<add_num;i++){
			state.lines.push({id:''+state.count,choose:0});
			state.count++;
		}
	},
	delBar(state,del_num){
		state.lines.splice(state.lines.length-del_num,del_num);
	},
	minus(state,id){
		let lines = state.lines;
		for(let i=0;i<lines.length;i++){
			if(lines[i].id === id)
				state.lines.splice(i,1);
		}
	},
	setChoose(state,{index,choose}){
		state.lines[index].choose = choose;
	}
}
